home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / bridge / AppAnim.rx < prev    next >
Text File  |  2002-12-21  |  995b  |  73 lines

  1. /*     arexx Script 
  2.     Make anim with pictures
  3. */
  4.  
  5.     options results
  6.     parse ARG Port count b
  7.     
  8.     ADDRESS value Port
  9.     file="Ram:MultiFile"
  10.  
  11.     IF OPEN("g",file,"read") then DO
  12.  
  13.         file=READLN("g")
  14.         file2=""
  15.     DO i=1 to LENGTH(file)
  16.         a=SUBSTR(file,i,1)
  17.       IF a=" " then DO
  18.           a="*"
  19.       END
  20.       file2=file2||a
  21.     END
  22.        file=file2
  23.  
  24.         pp_Load file
  25.         pp_GetWidth
  26.         IF result=0 then DO
  27.             pp_Warn "Can't*load*first*picture."
  28.             EXIT
  29.         END
  30.  
  31.         pp_AnimGui 1
  32.         IF result<2 then DO
  33.             EXIT
  34.         END
  35.  
  36.         pp_MakeAnim count Preview
  37.         pp_CountFrames
  38.         count=result
  39.         Do i=1 to count-1
  40.             pp_FastNextFrame
  41.             file=READLN("g")
  42.             file2=""
  43.         DO ii=1 to LENGTH(file)
  44.             a=SUBSTR(file,ii,1)
  45.           IF a=" " then DO
  46.               a="*"
  47.           END
  48.           file2=file2||a
  49.         END
  50.            file=file2
  51.  
  52.             pp_Bload file
  53.             pp_GetWidthB
  54.             w=result
  55.             IF w=0 then DO
  56.                 EXIT
  57.             END
  58.             pp_GetHeightB
  59.             h=result
  60.             x=w/2
  61.             y=h/2
  62.             pp_Plot x y
  63.         END
  64.         CALL close(file)        
  65.         pp_GotoFrame 1
  66.     END
  67.     pp_FreeBrush
  68.  
  69. exit
  70.     
  71.  
  72.  
  73.